/**
 * Copyright:Copyright(c)2014-2017
 * Company:厦门市易致达物联网科技有限公司
 * @version 1.0
 */
package shop.controller.front.catalog;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import shop.core.FrontBaseController;
import shop.core.Services;
import shop.core.common.bean.JSONResult;
import shop.core.common.dao.page.PagerModel;
import shop.services.front.catalog.CatalogService;
import shop.services.front.catalog.bean.Catalog;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @类名称：CatalogController
 * @创建人：Wzl
 * @创建时间：2017-09-20 下午15:34:37
 * @版本号：1.0
 * @描述：商品类别
 */
@Controller
@RequestMapping("/front/catalog/")
public class CatalogController extends FrontBaseController<Catalog> {
    @Resource
    private CatalogService catalogService;
    @Override
    public Services<Catalog> getService() {
        return catalogService;
    }


    /**
     * 查询商品目录
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("selectCatalogList")
    @ResponseBody
    public JSONResult selectCatalogList(Catalog catalog){
        List<Catalog> catalogList = catalogService.selectCatalogList(catalog);
        JSONResult jsonResult = new JSONResult();
        jsonResult.setData(catalogList);
        return jsonResult;
    }

    @Override
    public JSONResult insertJson(HttpServletRequest request, Catalog catalog) throws Exception {
        return null;
    }

    @Override
    public JSONResult updateJson(HttpServletRequest request, Catalog catalog) throws Exception {
        return null;
    }

    @Override
    public JSONResult deleteJson(HttpServletRequest request, Catalog catalog) throws Exception {
        return null;
    }
}
